	DOUBLE PRECISION PILOW,SLNGTH,PIUP,FACT
	DOUBLE PRECISION K,SIDES,SUM,SSQ,TERM,TEMP
	BYTE ITU(80)


	CALL OPEN (6,'RFILE   DAT',2)

	WRITE(6,198,REC=1)
198	FORMAT(10X,' BOUNDS ON PI - DOUBLE PRECISION BINOMIAL THEOREM',
     1  ' VERSION.')
	WRITE(6,199,REC=2)
199	FORMAT('   N     SIDES    SIDE LENGTH   PI - LOWER BOUND',
     1  '   PI - UPPER BOUND')
	SIDES=4.0
	SUM=2.0
	N=3
1	SIDES=2.0*SIDES
	SSQ=SUM
	SUM=0.0
	TERM=.25*SSQ
	K=1
2	TEMP=TERM+SUM
	IF(TEMP.LE.SUM) GOTO 4
	SUM=TEMP
	FACT=(2.0*K-1.00)/(K+1.0)
	TERM=FACT*SSQ*TERM/8.0
	K=K+1.0
	GOTO 2
4	SLNGTH=DSQRT(SUM)
	PILOW=0.5*SIDES*SLNGTH
	PIUP=SIDES*SLNGTH/(2.0-SLNGTH)
	WRITE(6,200,REC=N) N,SIDES,SLNGTH,PILOW,PIUP
	IF(N.EQ.20) GOTO 8
	N=N+1
	GOTO 1
200	FORMAT(1X,I3,F9.0,F15.6,2F19.12)

8	READ(6,300,REC=1) ITU
300	FORMAT(80A1)
	WRITE(1,300) ITU
	WRITE(1,302)
	READ(6,300,REC=2) ITU
	WRITE(1,300) ITU
302	FORMAT(1X)
	DO 9 I = 3,20
	READ(6,300,REC=I) ITU
9	WRITE(1,300) ITU
	WRITE(1,302)
	STOP
	END
